package com.sgj.springcloud.alibaba.controller;

import com.sgj.springcloud.alibaba.domain.CommonResult;
import com.sgj.springcloud.alibaba.domain.Order;
import com.sgj.springcloud.alibaba.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 沈国纪
 * @date 2021/6/6 10:56
 */
@RestController
public class OrderController {

	@Autowired
	private OrderService orderService;

	@GetMapping("/order/create")
	public CommonResult create(Order order) {
		orderService.create(order);
		return new CommonResult(200, "订单创建成功");
	}
}